package kassiopeia.agent.io;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import kassiopeia.commons.io.Message;
import kassiopeia.plugin.Event;

public final class EventMessage extends Message {

    private static final long serialVersionUID = 1L;

    private Event event;
    private String instanceId;
    private String outputId;

    public EventMessage(String sourceId, String instanceId, String outputId, Event event) {
        super(sourceId);
        this.event = event;
        this.outputId = outputId;
        this.instanceId = instanceId;
    }

    public Event getEvent() {
        return event;
    }

    public String getInstanceId() {
        return instanceId;
    }

    public String getOutputId() {
        return outputId;
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }

    @Override
    public boolean equals(Object obj) {
        return EqualsBuilder.reflectionEquals(this, obj);
    }
}
